import request from 'UTIL/request'

/**
 * 销售简报统计
 * @param params
 */
export function crmInstrumentQueryBulletin(params) {
  return request({
    url: 'biCrmInstrument/queryBulletin',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}

/**
 * 销售简报列表
 * @param params
 */
export function BulletinList(params) {
  return request({
    url: 'crmInstrument/queryBulletinInfo',
    method: 'POST',
    data: params
  })
}

/**
 * 业绩指标
 * @param params
 */
export function crmInstrumentQueryPerformance(params) {
  return request({
    url: 'biCrmInstrument/queryPerformance',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}

/**
 * 销售漏斗
 * @param params
 */
export function crmInstrumentSellFunnel(params) {
  return request({
    url: 'biFunnel/sellFunnel',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}


/**
 * 业绩金额及目标完成率
 * @param params
 */
export function crmInstrumentSalesTrend(params) {
  return request({
    url: 'biCrmInstrument/salesTrend',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}

/**
 * 数据汇总
 * @param params
 */
export function QueryDataInfo(params) {
  return request({
    url: 'biCrmInstrument/queryDataInfo',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}

/**
 * 销售趋势
 * @param params
 */
export function QueryRecordOptions(params) {
  return request({
    url: 'crmRecord/queryRecordOptions',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}

/**
 * 新增跟进记录统计
 * @param params
 */
export function QueryRecordCount(params) {
  return request({
    url: 'crmInstrument/queryRecordCount',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}

/**
 * 新增跟进记录列表
 * @param params
 */
export function QueryRecordList(params) {
  return request({
    url: 'crmActivity/getCrmActivityPageList',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}

/**
 * 遗忘提醒
 * @param params
 */
export function ForgetCount(params) {
  return request({
    url: 'crmInstrument/forgottenCustomerCount',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}

/**
 * 遗忘提醒列表
 * @param params
 */
export function ForgetList(params) {
  return request({
    url: 'crmInstrument/forgottenCustomerPageList',
    method: 'POST',
    data: params
  })
}

/**
 * 逾期未联系的客户列表
 * @param params
 */
export function ForgetCustomerList(params) {
  return request({
    url: 'crmInstrument/unContactCustomerPageList',
    method: 'POST',
    data: params
  })
}

/**
 * 排行榜
 * @param params
 */
export function biRankingReceivablesAPI(params) {
  return request({
    url: 'biRanking/receivablesRanKing',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}
/**
 * 业绩金额
 * @param {*} data
 * year 年
 * status 1销售（目标）2回款（目标）
 * user_id 员工ID
 * structure_id 部门ID
 */
export function biRankingContractAPI(data) {
  return request({
    url: 'biRanking/contractRanKing',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    hideLoading: true
  })
}
/**
 * 合同数排行榜
 * @param {*} data
 */
 export function biRankingContractCountAPI(data) {
  return request({
    url: 'biRanking/contractCountRanKing',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    hideLoading: true
  })
}
/**
 * 新增客户数排行榜
 * @param {*} data
 */
 export function biRankingCustomerCountAPI(data) {
  return request({
    url: 'biRanking/customerCountRanKing',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    hideLoading: true
  })
}
/**
 * 新增联系人排行榜
 * @param {*} data
 */
 export function biRankingContactsCountAPI(data) {
  return request({
    url: 'biRanking/contactsCountRanKing',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    hideLoading: true
  })
}
/**
 * 新增跟进记录数排行榜
 * @param {*} data
 */
 export function biRankingRecordCountAPI(data) {
  return request({
    url: 'biRanking/recordCountRanKing',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    hideLoading: true
  })
}
/**
 * 新增合同跟进记录
 * @param {*} params
 */
 export function instrumentQueryRecordList(params) {
  return request({
    url: 'crmInstrument/queryRecordList',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}
